home *** CD-ROM | disk | FTP | other *** search
- .Na "dbtabname"
- .mc |
- .Aa
- .Fu
- Return the name of a table based on its number.
- .Ih "table, returning name of"
- .Sy
- .Sf "char *dbtabname(dbproc, tabnum)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "tabnum"
- .Co
- .Bl
- \f2dbtabname()\f1 is one of the \*L browse mode routines.
- It is usable only with results from a browse-mode SELECT (\f2i.e.,\f1
- a SELECT containing the key words FOR BROWSE).
- See the Introduction for a detailed discussion of browse mode.
- .Bl
- A SELECT query can generate a set of result rows whose columns are
- derived from several database tables.
- \f2dbtabname()\f1 provides a way for
- an application to determine the name of each table involved in an ad hoc query.
- If the query has been hardcoded into the program, this routine is obviously unnecessary.
- .Bl
- The application can call
- \f2dbtabname()\f1 any time after \f2dbresults()\f1.
- .Bl
- Example 7 in the \f2\*L Reference Supplement\f1 contains a call to \f2dbtabname()\f1.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi tabnum
- The number of the table of interest.
- Table numbers start with 1.
- Use \f2dbtabcount()\f1
- to find out the total number of tables involved in a particular query.
- .in -.375i
- .Re
- .br
- A pointer to the null-terminated name of the specified table.
- This pointer will be NULL if the table number is out of range
- or if the specified table is a \*S work table.
- See the
- \f2dbtabcount()\f1 manual page for a description of work tables.
- .Sa
- dbcolbrowse,
- dbcolsource,
- dbqual,
- dbtabbrowse,
- dbtabcount,
- dbtabsource,
- dbtsnewlen,
- dbtsnewval,
- dbtsput
- .mc
-